#include <stdio.h>


//本地持久化：程序的数据进行保存和读取
int main(){
    FILE *f=fopen("./telephone.txt","r");
    if(!f){
        printf("文件读取失败\n");
        return -1;
    }
    // char *name="zhangsan";
    // char *tele="123456";
    //fprintf(f,"name=%s tele=%s",name,tele);

    char name[20]={0};
    char tele[20]={0};
    //格式化读取
    fscanf(f,"name=%s tele=%s",name,tele);
    printf("name:%s tele:%s\n",name,tele);
    fclose(f);
    return 0;
}